<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-for遍历数组</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="(value,index) in names">{{index+1}}.{{value}}</li>
        </ul>
    </div>
</body>
    <script src="../js/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                names: [
                    'why',
                    'kobe',
                    'james',
                    'curry',
                ],
            },
        })
    </script>
</html>